﻿using System;
using System.Collections.Generic;
using System.Text;

namespace EC.Application.Interface
{
    using EC.Entity;
    using EC.Entity.Query;
    using EC.Entity.Request.IpTable;
    using EC.Entity.Response.IpTable;
    public interface IPTableService
    {
        /// <summary>
        /// 根据系统类型获取白名单列表
        /// </summary>
        /// <returns></returns>
        IList<IpTableCacheEntity> GetIptable(int systemType);

        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        IpTableResponse Get(int id);

        /// <summary>
        /// 新增、编辑
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        JResult SaveIpTable(SaveIpTableRequest request);

        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        DataGrid<IpTableResponse> GetPager(IpTableQuery query);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        JResult DelIpTable(int Id);

        /// <summary>
        /// 重置缓存
        /// </summary>
        /// <param name="systemType"></param>
        void ResetCache(int systemType);
    }
}
